﻿using System;
using System.Collections.Generic;
using Newtonsoft.Json.Linq;
using JsonCSharpClassGenerator;

namespace BEX.Core.Exchange.BTCE.BTCEResponseJsonTypes
{
    public class Ticker
    {
        private JObject __jobject;
        public Ticker(JObject obj)
        {
            this.__jobject = obj;
        }

        public double high
        {
            get
            {
                return JsonClassHelper.ReadFloat(JsonClassHelper.GetJToken<JValue>(__jobject, "high"));
            }
        }

        public double low
        {
            get
            {
                return JsonClassHelper.ReadFloat(JsonClassHelper.GetJToken<JValue>(__jobject, "low"));
            }
        }

        public double avg
        {
            get
            {
                return JsonClassHelper.ReadFloat(JsonClassHelper.GetJToken<JValue>(__jobject, "avg"));
            }
        }

        public double vol
        {
            get
            {
                return JsonClassHelper.ReadFloat(JsonClassHelper.GetJToken<JValue>(__jobject, "vol"));
            }
        }

        public double vol_cur
        {
            get
            {
                return JsonClassHelper.ReadFloat(JsonClassHelper.GetJToken<JValue>(__jobject, "vol_cur"));
            }
        }

        public double last
        {
            get
            {
                return JsonClassHelper.ReadFloat(JsonClassHelper.GetJToken<JValue>(__jobject, "last"));
            }
        }

        public double buy
        {
            get
            {
                return JsonClassHelper.ReadFloat(JsonClassHelper.GetJToken<JValue>(__jobject, "buy"));
            }
        }

        public double sell
        {
            get
            {
                return JsonClassHelper.ReadFloat(JsonClassHelper.GetJToken<JValue>(__jobject, "sell"));
            }
        }

        public int updated
        {
            get
            {
                return JsonClassHelper.ReadInteger(JsonClassHelper.GetJToken<JValue>(__jobject, "updated"));
            }
        }

        public int server_time
        {
            get
            {
                return JsonClassHelper.ReadInteger(JsonClassHelper.GetJToken<JValue>(__jobject, "server_time"));
            }
        }
    }
}
